import { http } from "@/utils/http";
import type { SelectDataType } from "./type";

type ResultTable = {
  total?: number;
  data?: Array<any>;
};

//根据typeCode和itemValue查询子项
export const queryChildByTypeCodeAndItemValue = (data?: object, cb?: (err: any) => any) => {
  return http.request<SelectDataType>(
    "post",
    `/account/api/v1/publish/dictItem/queryChildByTypeCodeAndItemValue`,
    {
      data
    },
    null,
    cb
  );
};

//废液 查询列表
export const getqueryListPage = (data?: object) => {
  return http.request<ResultTable>("post", `/operation/api/v1/water/generalWaste/solid/queryListPage`, {
    data
  });
};

//废液 新增
export const solidAdd = (data?: object) => {
  return http.request<ResultTable>("post", `/operation/api/v1/water/generalWaste/solid/add`, {
    data
  });
};

//废液 更新
export const solidUpdate = (data?: object) => {
  return http.request<ResultTable>("post", `/operation/api/v1/water/generalWaste/solid/update`, {
    data
  });
};

//废液 删除
export const solidDelete = (data?: object) => {
  return http.request<ResultTable>("post", `/operation/api/v1/water/generalWaste/solid/delete`, {
    data
  });
};

//废液 删除文件接口
export const solidFileDelete = (data?: object) => {
  return http.request<ResultTable>("post", `/operation/api/v1/water/generalWaste/solid/file/delete`, {
    data
  });
};

//废液 详情
export const solidqueryDetail = (data?: object) => {
  return http.request<ResultTable>("post", `/operation/api/v1/water/generalWaste/solid/queryDetail`, {
    data
  });
};
//废液 导出
export const solidExport = (data?: object) => {
  return http.request<ResultTable>("post", `/operation/api/v1/water/generalWaste/solid/export`, {
    data
  });
};
